﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Puzzler.Common;

namespace Puzzler.Plugin.Interface
{
    public abstract class PuzzleRibbonHandler<TModel> : IPuzzleRibbonHandler, IModelable<TModel> where TModel : PuzzleModel
    {
        public TModel Model { get; private set; }

        protected PuzzleRibbonHandler(TModel model)
        {
            Model = model;
        }

        /// <summary>
        /// Click on ribbon button
        /// </summary>
        /// <param name="key">Key of button that was clicked</param>
        public virtual void OnRibbonButtonClick(String key)
        {
            
        }
        /// <summary>
        /// Click on ribbon check box while it checks
        /// </summary>
        /// <param name="key">Key of check box that was checked</param>
        public virtual void OnRibbonChecked(String key)
        {
            
        }
        /// <summary>
        /// Click on ribbon check box while it unchecks
        /// </summary>
        /// <param name="key">Key of check box that was unchecked</param>
        public virtual void OnRibbonUnchecked(String key)
        {
            
        }
        /// <summary>
        /// Click on ribbon gallery item or combobox item while it selects
        /// </summary>
        /// <param name="key">Key of element that was selected</param>
        public virtual void OnRibbonSelected(String key)
        {
            
        }
        /// <summary>
        /// Click on ribbon gallery item or combobox item while it unselects
        /// </summary>
        /// <param name="key">Key of element that was unselected</param>
        public virtual void OnRibbonUnselected(String key)
        {
            
        }

        #region Plugin Action

        public virtual void OnInitialized()
        {
        }

        public virtual void OnDone()
        {
        }

        public virtual void OnActivated()
        {
        }

        public virtual void OnDeactivated()
        {
        }

        #endregion
    }
}
